Optimal. Leaf size=37 \[ \frac {b \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3598, 2718,
2672, 327, 212} \begin {gather*} -\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d}+\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 327
Rule 2672
Rule 2718
Rule 3598
Rubi steps
\begin {align*} \int \sin (c+d x) (a+b \tan (c+d x)) \, dx &=\int (a \sin (c+d x)+b \sin (c+d x) \tan (c+d x)) \, dx\\ &=a \int \sin (c+d x) \, dx+b \int \sin (c+d x) \tan (c+d x) \, dx\\ &=-\frac {a \cos (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {b \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 48, normalized size = 1.30 \begin {gather*} \frac {b \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \cos (c) \cos (d x)}{d}+\frac {a \sin (c) \sin (d x)}{d}-\frac {b \sin (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 40, normalized size = 1.08
method | result | size |
derivativedivides | \(\frac {-a \cos \left (d x +c \right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(40\) |
default | \(\frac {-a \cos \left (d x +c \right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(40\) |
risch | \(\frac {i {\mathrm e}^{i \left (d x +c \right )} b}{2 d}-\frac {{\mathrm e}^{i \left (d x +c \right )} a}{2 d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )} b}{2 d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a}{2 d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(101\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.33, size = 46, normalized size = 1.24 \begin {gather*} \frac {b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} - 2 \, a \cos \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 49, normalized size = 1.32 \begin {gather*} -\frac {2 \, a \cos \left (d x + c\right ) - b \log \left (\sin \left (d x + c\right ) + 1\right ) + b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right ) \sin {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1236 vs.
\(2 (37) = 74\).
time = 0.53, size = 1236, normalized size = 33.41 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.82, size = 53, normalized size = 1.43 \begin {gather*} \frac {2\,b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________